#!/usr/bin/env python
# SimpleXMLRPCServer Basic Example - Chapter 17 - simple.py
# This program requires Python 2.3 or above

from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler

class Math:
    def pow(self, x, y):
        return x ** y

    def hex(self, x):
        return "%x" % x


serveraddr = ('', 8767)
srvr = SimpleXMLRPCServer(serveraddr,SimpleXMLRPCRequestHandler)
srvr.register_instance(Math())
srvr.register_introspection_functions()
srvr.serve_forever()
